<%@ page contentType="text/html; charset=utf-8" language="java"  errorPage="" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>档案管理</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {
	color: #000000;
	font-size: 12;
}
.STYLE10 {
	color: #000000;
	font-size: 12px;
}
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
<script>
var  highlightcolor='#d5f4fe';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>
<script type="text/javascript" src="/js/swfupload/swfupload.js"></script>
<script type="text/javascript" src="/js/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="/js/swfupload/fileprogress.js"></script>
<script type="text/javascript" src="/js/swfupload/handlers.js"></script>
<script type="text/javascript">
		var swfu;

		window.onload = function() {
			var flowno = document.getElementById('flowno');
			var settings = {
				flash_url : "/js/swfupload/swfupload.swf",
				upload_url: "/officaltext/uploadOfficalText.do",
				post_params: {"flowno":flowno.value,"ismainfile":"yes"},
				file_size_limit : "100 MB",
				file_types : "*.*",
				file_types_description : "All Files",
				file_upload_limit : 100,
				file_queue_limit : 0,
				custom_settings : {
					progressTarget : "fsUploadProgress",
					cancelButtonId : "btnCancel",
					uploadButtonId : "btnUpload"
				},
				debug: false,

				// Button settings
				button_image_url: "/js/swfupload/TestImageNoText_65x29.png",
				button_width: "60",
				button_height: "30",
				button_placeholder_id: "spanButtonPlaceHolder",
				button_action : SWFUpload.BUTTON_ACTION.SELECT_FILES,
				button_text: '<span class="theFont">请选择</span>',
				button_text_style: ".theFont { font-size: 12; }",
				button_text_left_padding: 5,
				button_text_top_padding: 3,
				
				// The event handler functions are defined in handlers.js
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccessCustom,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete	// Queue plugin event
			};

			swfu = new SWFUpload(settings);
	     };
		 
	function uploadSuccessCustom(file, serverData) {
	try {
		var progress = new FileProgress(file, this.customSettings.progressTarget);
		progress.setComplete();
		progress.setStatus("完成.");
		var map = JSON.parse(serverData) ;
		for(var i in map){
		   alert(map[i].title);
		   alert(map[i].path);
		}		
		//progress.toggleCancel(false);

	} catch (ex) {
		this.debug(ex);
	}
}
	</script>
<link href="/images/css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/js/swfupload/default.css"/>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="30%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="6%" height="19" valign="bottom"><div align="center"><img src="/images/tb.gif" width="14" height="14" /></div></td>
                      <td width="94%" valign="bottom"><span class="STYLE1"> 添加档案信息</span></td>
                    </tr>
                  </table></td>
                <td width="79%"><div align="left"><span class="STYLE1">
                    <input type="checkbox" name="checkbox11" id="checkbox11" />
                    高级选项</span></div></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="2" cellpadding="0">
        <html:form action="/addArchive.do" method="post">
          <html:hidden property="action" value="add"/>
          <tr>
            <td width="15%" height="25" align="right">档案种类</td>
            <td width="85%" height="25"><html:select property="archivetype">
                <html:option value="" >档案种类</html:option>
              </html:select></td>
          </tr>
          <tr>
            <td height="25" align="right">文件种类/载体种类</td>
            <td height="25"><html:select property="filetype">
                <html:option value="" >文件种类</html:option>
              </html:select></td>
          </tr>
          <tr>
            <td height="25" align="right">文件提名/提名分说明</td>
            <td height="25"><html:text property="title" /></td>
          </tr>
          <tr>
            <td height="25" align="right">文献类型</td>
            <td height="25"><html:select property="literaturetype">
                <html:option value="电子文档" />
              </html:select>
            </td>
          </tr>
          <tr>
            <td height="25" align="right">并列题名/副题名</td>
            <td height="25"><html:text property="titleremark" /></td>
          </tr>
          <tr>
            <td height="25" align="right">文件编号</td>
            <td height="25"><html:text property="fileno" /></td>
          </tr>
          <tr>
            <td height="25" align="right">主题/关键字</td>
            <td height="25"><html:text property="keyword" /></td>
          </tr>
          <tr>
            <td height="25" align="right">文件年代/工程代号</td>
            <td height="25"><html:text property="code" /></td>
          </tr>
          <tr>
            <td height="25" align="right">类目号</td>
            <td height="25"><html:text property="category" /></td>
          </tr>
          <tr>
            <td height="25" align="right">数量</td>
            <td height="25"><html:text property="pagenumber" />
              页/张/件/盘</td>
          </tr>
          <tr>
            <td height="25" align="right">责任者</td>
            <td height="25"><html:text property="duty" /></td>
          </tr>
          <tr>
            <td height="25" align="right">其他责任者</td>
            <td height="25"><html:text property="otherduty" /></td>
          </tr>
          <tr>
            <td height="25" align="right">电子文档名</td>
            <td height="25"><html:text property="electronicfilename" /><a href="javascript:" onclick="document.getElementById('uploadFrame').style.display='block';">上传正文</a></td>
          </tr>
          <tr>
            <td height="25" align="right">附件标题</td>
            <td height="25"><html:text property="attachmenttitle" /><a href="javascript:" onclick="document.getElementById('uploadFrame').style.display='block';">上传附件</a></td>
          </tr>
          <tr>
            <td height="25" align="right">附件路径</td>
            <td height="25"><html:text property="attachmentpath"/></td>
          </tr>
          <tr>
            <td height="25" align="right">份数</td>
            <td height="25"><html:text property="copys" /></td>
          </tr>
          <tr>
            <td height="25" align="right">备注</td>
            <td height="25"><html:text property="memo" /></td>
          </tr>
          <tr>
            <td height="25" align="right">密级</td>
            <td height="25"><html:text property="securityclass" /></td>
          </tr>
          <tr>
            <td height="25" align="right">保密期限（天）</td>
            <td height="25"><html:text property="securityterm" /></td>
          </tr>
          <tr>
            <td height="25" align="right">保管期限</td>
            <td height="25"><html:text property="retentionperiod" /></td>
          </tr>
          <tr>
            <td height="25" align="right">归档日期</td>
            <td height="25"><html:text property="archivedate" /></td>
          </tr>
          <tr>
            <td height="25" align="right">存址号/归档号</td>
            <td height="25"><html:text property="archivalcode" /></td>
          </tr>
          <tr>
            <td height="25" align="right">全宗号</td>
            <td height="25"><html:text property="dossierno" /></td>
          </tr>
          <tr>
            <td height="25" align="right">电子档号</td>
            <td height="25"><html:text property="archiveno" /></td>
          </tr>
          <tr>
            <td height="25" align="right">件号</td>
            <td height="25"><html:text property="unitno" /></td>
          </tr>
          <tr>
            <td height="25" align="right">历次物理归档情况</td>
            <td height="25"><html:text property="filingtrace" /></td>
          </tr>
          <tr>
            <td height="25" align="right">移交人</td>
            <td height="25"><html:text property="handover" /></td>
          </tr>
          <tr>
            <td height="25" align="right">归档稿本/版本情况说明</td>
            <td height="25"><html:textarea property="filingscripts"/></td>
          </tr>
          <tr>
            <td height="25" align="right">档案人员再次鉴定信息</td>
            <td height="25"><html:textarea property="reappraisedates"/></td>
          </tr>
          <tr>
            <td height="25" align="right">附注</td>
            <td height="25"><html:text property="annotation" /></td>
          </tr>
          <tr>
            <td height="25" align="right">提要</td>
            <td height="25"><html:textarea property="description"/></td>
          </tr>
          <tr>
            <td height="25" align="right">传阅意见</td>
            <td height="25"><html:text property="suggest"/></td>
          </tr>
          <tr>
            <td height="25" align="right">流程跟踪</td>
            <td height="25"><html:text property="recordtransfer"/></td>
          </tr>
          <tr>
            <td height="25" align="right">附件路径</td>
            <td height="25"><html:text property="attachmentpath"/></td>
          </tr>
          <tr>
            <td height="25" align="right">案卷号</td>
            <td height="25"><html:text property="volumnno"/></td>
          </tr>
          <tr>
            <td height="25" align="right">流水号</td>
            <td height="25"><html:text property="flowno" value="1234"/></td>
          </tr>
          <tr>
            <td height="25" align="right">&nbsp;</td>
            <td height="25">&nbsp;
              <html:submit value="提   交"/></td>
          </tr>
        </html:form>
        <tr>
          <td height="25" align="right">&nbsp;</td>
          <td height="25"></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="30">&nbsp;</td>
  </tr>
</table>
<div id="uploadFrame" style="width:500px; padding:10px; display:hidden; height:auto; border:#000000 3px solid; background-color:#FFFFFF; position:absolute;left:300px; top:200px; display:none;" >
  <strong>正文上传</strong><span style="float:right;">[<a href="javascript:" onclick="document.getElementById('uploadFrame').style.display='none';">关闭</a>]</span>
  <form id="form1" action="" method="post" enctype="multipart/form-data">
    
    <span>正文文件说明</span>
    <div class="fieldset flash" id="fsUploadProgress"> <span class="legend">上传列表</span> </div>
    <div id="divStatus">0 个文件已经上传</div>
    <div> <span id="spanButtonPlaceHolder"></span>
      <input id="btnUpload" type="button" value="开始上传" onclick="swfu.startUpload();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
      <input id="btnCancel" type="button" value="取消所有上传" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
    </div>
  </form>
</div>



</body>
</html>
